import request from "@/utils/request";

// 会话列表
export const listChat = (data) => {
    return request({
        url: '/app/chat/list',
        method: 'get',
        params: data
    })
}

// 修改会话
export const editChat = ({id, title}) => {
    return request({
        url: '/app/chat',
        method: 'put',
        data: {
            id: id,
            title: title
        }
    })
}

// 删除会话
export const removeChat = (id) => {
    return request({
        url: '/app/chat/' + id,
        method: 'delete'
    })
}

// 删除会话
export const removeAllChat = () => {
    return request({
        url: '/app/chat/all',
        method: 'delete'
    })
}